<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="../../header.jsp"%>
<meta charset="UTF-8" />
<style>
	.list-group-item{
		position: relative;
	}
	.list-group-item img{
		width:80px;
		height:80px;
	}
	
	.list-group-item span{
		position: absolute;
		top: 0;
		right:0;
		display: none;
	}
	
	.list-group-item:hover{
		background: #d4d4d4;
		cursor: pointer;
	}
	
	.list-group-item:hover span{
		display: block;
	}
	
</style>
<div class="container">
	<div class="panel panel-info">
   <div class="panel-heading">
      <h3 class="panel-title">删除用户</h3>
   </div>
    <div class="panel-body">
		<form class="form-horizontal" action="${ctx }/user/userlock" id="defaultForm" method="post">
		  	<div class="form-group">
						<label for="firstname" class="col-sm-2 control-label">标题：</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="name" placeholder="请输入昵称">
						</div>
			</div>
		 <div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="submit" class="btn btn-info">搜 索</button>
						</div>
					</div>
		</form>
   </div>
   <div class="panel-body">
		<ul id="list-group">
			<c:forEach items="${users }" var="bean">
				<li class="list-group-item" data-h="${bean.customerId }">
				${bean.firstName }
				<img src="${bean.avatar }" class="img-circle" />
				<span class="glyphicon glyphicon-remove"></span>
				</li>
			</c:forEach>
		</ul>
   </div>
</div>
</div>
<script>
$(".mkbanner >li:eq(8)").addClass("active");
$(".list-group-item span").click(function(){
	var userId = $(this).parent().attr("data-h");
	if(confirm("确定禁用此用户吗？")){
		$.post(ctx + "/user/lock",{
			userId:userId
		},function(result){
			result_(result);
		});
	}
});
</script>